package com.woniu.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 修改用户密码的form 数据
 */
@Data
@ApiModel("修改用户密码的form数据")
public class ModifyPwdForm {
    /*
    旧密码
     */
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "\\d+", message = "密码必须是数字")
    @ApiModelProperty("旧密码")
    private String oldPassword;
    /*
    新密码
     */
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "\\d+", message = "密码必须是数字")
    @ApiModelProperty("新密码")
    private String newPassword;
}
